
    <!-- 项目管理 -->
    <template>
        <div class="page-box h100 display-flex czbj">
         
          <p class="title-label mb10" v-if="!iscz">分析记录</p>
          <dxtable  
          :dataJson="dataJson" 
          :portUrl="portUrl" 
          :formJson="formJson"
          :hidebj="iscz"
          :headBtn="headBtn"
           :qx="qx" ref="databale" ></dxtable>
       
        </div>
      </template>
      <script lang='ts' setup>
      import { flatten } from "naive-ui/es/_utils";
import dxtable from "../../components/util/dxtable.vue";
      import sort from "../../components/util/sort.vue";
      import { dxget, dxpost } from "../../util/index";
      import { NButton, NImage, NTag } from "naive-ui"
      import { h, ref, reactive } from "vue";
      const databale = ref();
      const emit = defineEmits(["callBack"]);
      const initeer = () => {
        databale.value.initDataExpose();
      };
      let headBtn = [];
      let props = defineProps({
        iscz:{ type: Boolean, default: false },
      })
      let dataJson = [
        {
              "title": "用户昵称",
              "type": "input",
              "val": "",
              "icon": "dx-shurukuang",
              "span": 12,
              "key": "nickname",
              "width": "250",
              "search": false,
              "istable": true,
              "required": false
          },{
              "title": "主队",
              "type": "input",
              "val": "",
              "icon": "dx-shurukuang",
              "span": 12,
              "key": "zdui",
              "width": "",
              "search": true,
              "istable": true,
              "required": false
          },
          {
              "title": "客队",
              "type": "input",
              "val": "",
              "icon": "dx-shurukuang",
              "span": 12,
              "key": "kdui",
              "width": "",
              "search": true,
              "istable": true,
              "required": false
          }
      ,
      {
        title: "添加时间",
        key: "addTime",
        width: 150,
      }];
      
      let qx = {
        DeletePermissionID: "fenxiListdel", //删除
        EditPermissionIdentifier: "fenxiListbj", // 编辑
        NewPermissionIdentifier: "fenxiListxz", // 新建
        ViewPermissionID: "fenxiListck", // 查看
      };
   
      
    
      const portUrl = "dxgj/dxsaishi/dxsaishi";
      
      let formJson = reactive([
          {
              "title": "主队",
              "type": "input",
              "val": "",
              "icon": "dx-shurukuang",
              "span": 12,
              "key": "zdui",
              "width": "",
              "search": false,
              "istable": true,
              "required": false
          },
          {
              "title": "客队",
              "type": "input",
              "val": "",
              "icon": "dx-shurukuang",
              "span": 12,
              "key": "kdui",
              "width": "",
              "search": false,
              "istable": true,
              "required": false
          }, {
              "title": "报告内容",
              "type": "textarea",
              "val": "",
              "icon": "dx-shurukuang",
              "span": 24,
              "key": "neirong",
              "width": "",
              "search": false,
              "istable": true,
              "required": false
          }
      ]);

      if(props.iscz){
        qx = {
        DeletePermissionID: "23456", //删除
        EditPermissionIdentifier: "23456", // 编辑
        NewPermissionIdentifier: "23456", // 新建
        ViewPermissionID: "fenxiListck", // 查看
      };
      headBtn = [
        {
            name: "确认选择 ",
            async clickFun(row) {
                const arrList = row.join(",");
                emit("callBack", arrList);
            },
        },
    ];
      }


      
      // 获取字典内容
      // const xtgxxmfl = async () => {
      //   const { data }: any = await dxget("dxgjAdmin/getzd", { name: 'xtgxxmfl' })
      //   dataJson[2].options = [
      //     {
      //       label: "全部",
      //       value: ""
      //     },
      //     ...data
      //   ]
      //   formJson[2].options = data
      //   xmlxSelect.value = data
      //   console.log(data);
      // }
      // xtgxxmfl()
      
      
      </script>
      <style scoped></style>
          